package gat.dto.res.tg.excel;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class ChatTypeConverter implements Converter<String> {
    @Override
    public WriteCellData convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        if (StringUtils.equals(value, "group")) {
            return new WriteCellData("群聊");
        } else if (StringUtils.equals(value, "private")) {
            return new WriteCellData("私聊");
        } else {
            return new WriteCellData("未知");
        }
    }

}
